<?php if (!defined('THINK_PATH')) exit();?>

<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="__TMPL__Common/style/style.css" />
<script type="text/javascript" src="__TMPL__Common/js/check_dog.js"></script>
<script type="text/javascript" src="__TMPL__Common/js/IA300ClientJavascript.js"></script>
<script type="text/javascript">
	var ACTION_ID ='<?php echo $action_id ?>';
 	var VAR_MODULE = "<?php echo conf("VAR_MODULE");?>";
	var VAR_ACTION = "<?php echo conf("VAR_ACTION");?>";
	var MODULE_NAME	=	'<?php echo MODULE_NAME; ?>';
	var ACTION_NAME	=	'<?php echo ACTION_NAME; ?>';
	var ROOT = '__APP__';
	var ROOT_PATH = '<?php echo APP_ROOT; ?>';
	var CURRENT_URL = '<?php echo trim($_SERVER['REQUEST_URI']);?>';
	var INPUT_KEY_PLEASE = "<?php echo L("INPUT_KEY_PLEASE");?>";
	var TMPL = '__TMPL__';
	var APP_ROOT = '<?php echo APP_ROOT; ?>';
	var LOGINOUT_URL = '<?php echo u("Public/do_loginout");?>';
	var WEB_SESSION_ID = '<?php echo es_session::id(); ?>';
	var EMOT_URL = '<?php echo APP_ROOT; ?>/public/emoticons/';
	var MAX_FILE_SIZE = "<?php echo (app_conf("MAX_IMAGE_SIZE")/1000000)."MB"; ?>";
	var FILE_UPLOAD_URL ='<?php echo u("File/do_upload");?>' ;
	CHECK_DOG_HASH = '<?php $adm_session = es_session::get(md5(conf("AUTH_KEY"))); echo $adm_session["adm_dog_key"]; ?>';
	function check_dog_sender_fun()
	{
		window.clearInterval(check_dog_sender);
		check_dog2();
	}
	var check_dog_sender = window.setInterval("check_dog_sender_fun()",5000);
	
</script>
	<script type="text/javascript" src="__TMPL__Common/js/cropper/jquery.min.js"></script>
<script type="text/javascript" src="__TMPL__Common/js/jquery.timer.js"></script>

<link rel="stylesheet" type="text/css" href="__TMPL__Common/style/weebox.css" />
<script type="text/javascript" src="__TMPL__Common/js/jquery.bgiframe.js"></script>
<script type="text/javascript" src="__TMPL__Common/js/jquery.weebox.js"></script>
<link rel="stylesheet" type="text/css" href="__TMPL__Common/js/cropper/cropper.min.css" />
<link rel="stylesheet" type="text/css" href="__TMPL__Common/js/cropper/main.css" />
<script type="text/javascript" src="__TMPL__Common/js/cropper/cropper.min.js"></script>

<script type="text/javascript" src="__TMPL__Common/js/script.js"></script>
<script type="text/javascript" src="__ROOT__/public/runtime/admin/lang.js"></script>
<script type='text/javascript'  src='__ROOT__/admin/public/kindeditor/kindeditor.js'></script>
<script type='text/javascript'  src='__ROOT__/admin/public/kindeditor/lang/zh_CN.js'></script>


</head>
<body onLoad="javascript:DogPageLoad();">
<div id="info"></div>


<script type="text/javascript" src="__TMPL__Common/js/jquery.bgiframe.js"></script>
<script type="text/javascript" src="__TMPL__Common/js/jquery.weebox.js"></script>
<script type="text/javascript" src="__TMPL__Common/js/user.js"></script>
<link rel="stylesheet" type="text/css" href="__TMPL__Common/style/weebox.css" />
<div class="main">
<div class="main_title_list"><div class="list-line-ico"></div>主播认证申请列表</div>
<?php function get_level($level){
		$user_level = $GLOBALS['db']->getOne("select `name` from ".DB_PREFIX."user_level where level = '".intval($level)."'");
		return $user_level;
	}
	 function head_image($head_image){
		return "<img src='".$head_image."' style='height:35px;width:35px;'/>";
	}

	function show_content_1($id,$user){
		switch($user['is_authentication']){
			case 1:
			return "<a href='javascript:show_content(".$id.",1);'>审核</a>";
			break;
			case 2:
			return "审核已通过";
			break;
			case 3:
			return "<a href='javascript:show_content(".$id.",1);'>未通过</a>";
			break;
		}
	}
	function user_type($user_type,$user){
	if($user['authentication_type']=='公会红人申请'){
	return "公会红人申请";
	}else{
	return "普通会员";
	}
	} ?>
 <script type="text/javascript">
	function show_content(id,$status)
	{
		$.ajax({
			url: ROOT+'?m=UserInvestor&a=show_content&id='+id+'&status='+$status,
			data: "ajax=1",
			dataType: "json",
			success: function(msg){
				if(msg.status==0){
					alert(msg.info);
				}
			},
			error: function(){
				$.weeboxs.open(ROOT+'?m=UserInvestor&a=show_content&id='+id+'&status='+$status, {contentType:'ajax',showButton:false,title:LANG['SHOW_CONTENT'],width:850,height:500});
			}
		});

	}
	function batch_content(id,$status)
	{
		if(!id)
		{
			idBox = $(".key:checked");
			if(idBox.length == 0)
			{
				alert("请选择要审核的用户");
				return;
			}
			idArray = new Array();
			$.each( idBox, function(i, n){
				idArray.push($(n).val());
			});
			id = idArray.join(",");

		}
		$.ajax({
			url: ROOT+'?m=UserInvestor&a=batch_content&id='+id+'&status='+$status,
			data: "ajax=1",
			dataType: "json",
			success: function(msg){
				if(msg.status==0){
					alert(msg.info);
				}
			},

			error: function(){
				$.weeboxs.open(ROOT+'?m=UserInvestor&a=batch_content&id='+id+'&status='+$status, {contentType:'ajax',showButton:false,title:LANG['SHOW_CONTENT'],width:1650,height:830});
			}

		});

	}
	function send(id)
	{
		$.ajax({
				url: ROOT+"?"+VAR_MODULE+"="+MODULE_NAME+"&"+VAR_ACTION+"=send&id="+id,
				data: "ajax=1",
				success: function(msg){
					alert(msg);
				}
		});
	}
</script>

<div class="search_row">
	<form name="search" action="__APP__" method="get" class="clearfix">
		<div>主播ID：<input type="text" class="textbox" name="id" value="<?php echo trim($_REQUEST['id']);?>" style="width:100px" /></div>
		<div>主播昵称：<input type="text" class="textbox" name="nick_name" value="<?php echo trim($_REQUEST['nick_name']);?>" style="width:100px" />
		<input type="hidden" value="UserInvestor" name="m" /><input type="hidden" value="index" name="a" /><input type="submit" class="button" value="<?php echo L("SEARCH");?>" /></div>
	</form>
</div>
<!-- Think 系统列表组件开始 -->
<table id="dataTable" class="dataTable" cellpadding=0 cellspacing=0 ><tr><td colspan="11" class="topTd" ></td></tr><tr class="row" ><th width="8"><input type="checkbox" id="check" onclick="CheckAll('dataTable')"></th><th width="90px    "><a href="javascript:sortBy('id','<?php echo ($sort); ?>','UserInvestor','index')" title="按照主播ID<?php echo ($sortType); ?> ">主播ID<?php if(($order)  ==  "id"): ?><img src="__TMPL__Common/images/<?php echo ($sortImg); ?>.gif" width="12" height="17" border="0" align="absmiddle"><?php endif; ?></a></th><th width="180px    "><a href="javascript:sortBy('nick_name','<?php echo ($sort); ?>','UserInvestor','index')" title="按照<?php echo L("NICK_NAME");?><?php echo ($sortType); ?> "><?php echo L("NICK_NAME");?><?php if(($order)  ==  "nick_name"): ?><img src="__TMPL__Common/images/<?php echo ($sortImg); ?>.gif" width="12" height="17" border="0" align="absmiddle"><?php endif; ?></a></th><th><a href="javascript:sortBy('authentication_type','<?php echo ($sort); ?>','UserInvestor','index')" title="按照认证名称    <?php echo ($sortType); ?> ">认证名称    <?php if(($order)  ==  "authentication_type"): ?><img src="__TMPL__Common/images/<?php echo ($sortImg); ?>.gif" width="12" height="17" border="0" align="absmiddle"><?php endif; ?></a></th><th width="150px    "><a href="javascript:sortBy('head_image','<?php echo ($sort); ?>','UserInvestor','index')" title="按照<?php echo L("USER_HEADIMAGE");?><?php echo ($sortType); ?> "><?php echo L("USER_HEADIMAGE");?><?php if(($order)  ==  "head_image"): ?><img src="__TMPL__Common/images/<?php echo ($sortImg); ?>.gif" width="12" height="17" border="0" align="absmiddle"><?php endif; ?></a></th><th><a href="javascript:sortBy('fans_count','<?php echo ($sort); ?>','UserInvestor','index')" title="按照<?php echo L("USER_FANS");?>    <?php echo ($sortType); ?> "><?php echo L("USER_FANS");?>    <?php if(($order)  ==  "fans_count"): ?><img src="__TMPL__Common/images/<?php echo ($sortImg); ?>.gif" width="12" height="17" border="0" align="absmiddle"><?php endif; ?></a></th><th><a href="javascript:sortBy('ticket','<?php echo ($sort); ?>','UserInvestor','index')" title="按照<?php echo L("USER_TICKET");?>     <?php echo ($sortType); ?> "><?php echo L("USER_TICKET");?>     <?php if(($order)  ==  "ticket"): ?><img src="__TMPL__Common/images/<?php echo ($sortImg); ?>.gif" width="12" height="17" border="0" align="absmiddle"><?php endif; ?></a></th><th><a href="javascript:sortBy('user_level','<?php echo ($sort); ?>','UserInvestor','index')" title="按照<?php echo L("LEVEL");?>    <?php echo ($sortType); ?> "><?php echo L("LEVEL");?>    <?php if(($order)  ==  "user_level"): ?><img src="__TMPL__Common/images/<?php echo ($sortImg); ?>.gif" width="12" height="17" border="0" align="absmiddle"><?php endif; ?></a></th><th><a href="javascript:sortBy('user_type','<?php echo ($sort); ?>','UserInvestor','index')" title="按照申请类型    <?php echo ($sortType); ?> ">申请类型    <?php if(($order)  ==  "user_type"): ?><img src="__TMPL__Common/images/<?php echo ($sortImg); ?>.gif" width="12" height="17" border="0" align="absmiddle"><?php endif; ?></a></th><th><a href="javascript:sortBy('is_authentication','<?php echo ($sort); ?>','UserInvestor','index')" title="按照申请状态<?php echo ($sortType); ?> ">申请状态<?php if(($order)  ==  "is_authentication"): ?><img src="__TMPL__Common/images/<?php echo ($sortImg); ?>.gif" width="12" height="17" border="0" align="absmiddle"><?php endif; ?></a></th><th width="60px">操作</th></tr><?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$user): ++$i;$mod = ($i % 2 )?><tr class="row" ><td><input type="checkbox" name="key" class="key" value="<?php echo ($user["id"]); ?>"></td><td><?php echo ($user["id"]); ?></td><td><?php echo ($user["nick_name"]); ?></td><td><?php echo ($user["authentication_type"]); ?></td><td><?php echo (head_image($user["head_image"])); ?></td><td><?php echo ($user["fans_count"]); ?></td><td><?php echo ($user["ticket"]); ?></td><td><?php echo (get_level($user["user_level"],$user['user_level'])); ?></td><td><?php echo (user_type($user["user_type"],$user)); ?></td><td><?php echo (get_investor_status($user["is_authentication"])); ?></td><td class="op_action"> <?php echo (show_content_1($user["id"],$user)); ?>&nbsp;</td></tr><?php endforeach; endif; else: echo "" ;endif; ?><tr><td colspan="11" class="bottomTd"> &nbsp;</td></tr></table>
<!-- Think 系统列表组件结束 -->

	<table class="dataTable">
		<tbody>
		</tbody>
	</table>
<div class="page"><?php echo ($page); ?></div>
</div>
</body>
</html>